/* 全局样式 */
body {
    font-family: 'Arial', sans-serif;
    background: #f5f7fa;
    margin: 0;
    padding: 0;
    color: #333;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden; /* 防止页面溢出 */
}

/* 顶部导航栏 */
.navbar {
    background: white; /* 设为白色 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* 添加阴影 */
}
.nav-left {
    display: flex;
    align-items: center;
}

.nav-title {
    font-size: 36px;
    font-weight: bold;
    color: #0056b3;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 20px;
    margin-right: 20px;
}

.nav-links a {
    color: #0056b3;
    text-decoration: none;
    font-size: 18px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #ffcc00;
    border-bottom: 3px solid #ffcc00;
    padding-bottom: 5px;
}

.nav-logo {
    height: 80px; /* 调整 logo 高度 */
    margin-right: 10px; /* 与标题保持间距 */
}


/* 取消推荐视频获取的默认选中状态 */
.nav-item .active {
    background: none !important;
    color: inherit !important;
}

/* 页面主体 */
.main-container {
    display: flex;
    height: calc(100vh - 70px); /* 70px 适配导航栏高度，需与 .navbar 一致 */
    overflow: hidden; /* 避免出现滚动条 */
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background: rgb(227, 236, 250);
    padding: 20px;
    border-right: 1px solid #ddd;
    height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
}

/* 功能模块样式 */
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar h3 {
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: bold;
}

.sidebar li {
    width: 100%; /* 确保列表项宽度填满侧边栏 */
    padding: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    text-align: left; /* 保证文本左对齐 */
}

/* 修正选中项背景色填充 */
.sidebar li.active {
    background: #3b87d8;
    color: white;
    font-weight: bold;
    width: 100%; /* 让背景色铺满 */
    display: block; /* 让 `li` 行内填充 */
}

/* 鼠标悬浮效果 */
.sidebar li:hover {
    background: #3b87d8;
    color: white;
}

.sidebar a {
    text-decoration: none; /* 取消下划线 */
    color: inherit; /* 继承父元素颜色 */
    display: block; /* 让链接填充整个列表项 */
    width: 100%;
    height: 100%;
}


/* 主要内容区域 */
.content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow: hidden;
}

.task-header {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 左右对齐 */
    margin-bottom: 20px;
    width: 100%;
}

.task-header .d-flex {
    width: 100%;
    justify-content: space-between;
}

/* 筛选功能优化 */
.task-header label {
    font-size: 18px;
    font-weight: bold;
    display: inline-block;
    margin-right: 8px;
}

.task-header select {
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #bbb;
    width: 100px;
}
/* 扩展筛选功能区 */
.filter-bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
}

.filter-bar select {
    width: 160px;
}

.filter-bar button {
    white-space: nowrap;
    height: 38px;
}

/* 机器人训练操作按钮 */
.robot-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* 训练按钮（模仿任务面板的“开始”按钮） */
.robot-actions .btn-start {
    background: #8cbf75; /* 低饱和度绿色 */
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.robot-actions .btn-start:hover {
    background: #76a564;
}

/* 查看按钮（模仿任务面板的“查看”按钮） */
.robot-actions .btn-view {
    background: #5e9dc8; /* 低饱和度蓝色 */
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.robot-actions .btn-view:hover {
    background: #4c87b0;
}

/* 删除按钮（模仿任务面板的“删除”按钮） */
.robot-actions .btn-delete {
    background: #d27b85; /* 低饱和度红色 */
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.robot-actions .btn-delete:hover {
    background: #b86470;
}

/* 低饱和度按钮颜色 */
.btn-primary {
    background: #3b87d8;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-primary:hover {
    background: #4875b0;
}

/* 添加机器人按钮（模仿视频任务页面的“新增任务”按钮） */
#addRobotBtn {
    background: #8cbf75; /* 低饱和度绿色 */
    color: white;
    font-size: 18px;
    padding: 12px 24px;
    border-radius: 8px;
    border: none; /* 去除边框 */
    cursor: pointer;
    transition: 0.3s;
}

#addRobotBtn:hover {
    background: #76a564;
}

/* 筛选按钮（模仿视频任务页面的“筛选”按钮） */
#filterBtn {
    background: #3b87d8; /* 低饱和度蓝色 */
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

#filterBtn:hover {
    background: #4875b0;
}

/* 任务栏 */
.task-container {
    width: 90%;
    height: 90%;
    max-width: 1500px;
    background: rgba(255, 255, 255, 1);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow: auto; /* 防止页面溢出 */
}

/* 机器人训练列表表格滚动 */
.robot-table-wrapper {
    max-height: 600px; /* 限制最大高度，防止表格撑满整个页面 */
    overflow-y: auto;  /* 启用垂直滚动 */
    border: 1px solid #ddd; /* 增加边框，使表格更清晰 */
    max-height: calc(100vh - 300px); /* 避免表格超出屏幕 */
}

/* 表头固定，保持与任务面板一致 */
.robot-table-wrapper thead {
    position: sticky;
    top: 0;
    background: #f1f1f1;
    z-index: 10;
}


thead {
    position: sticky;
    top: 0;
    background: #f1f1f1;
    z-index: 10;
}

th, td {
    padding: 16px;
    text-align: center;
    vertical-align: middle; /* 让内容上下居中 */
    font-size: 18px; /* 适当增加字体大小 */
}

/* 任务操作按钮 */
.task-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* 任务栏按钮统一样式 */
.task-actions button {
    padding: 10px 16px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 8px;
    margin: 5px;
    transition: 0.3s;
}

/* 低饱和度绿色：开始按钮 */
.task-actions .btn-start {
    background: #8cbf75;
    color: white;
}

.task-actions .btn-start:hover {
    background: #76a564;
}

/* 低饱和度蓝色：查看按钮 */
.task-actions .btn-view {
    background: #5e9dc8;
    color: white;
}

.task-actions .btn-view:hover {
    background: #4c87b0;
}

/* 低饱和度红色：删除按钮 */
.task-actions .btn-delete {
    background: #d27b85;
    color: white;
}

.task-actions .btn-delete:hover {
    background: #b86470;
}

button {
    padding: 10px 16px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    border-radius: 8px;
    margin: 5px;
    transition: 0.3s;
}
